/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package database;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Administrador
 */
public class AccesoDB {
	
	private static Connection cn = null;
	
	public static Connection getConnection() throws Exception {
		if( cn == null ){
			// Cargar el driver
			Class.forName("oracle.jdbc.OracleDriver");
                        String user = "eureka";
                        String password = "eureka";
			// Hacer la conexión
			String url = "jdbc:oracle:thin:@192.168.0.36:1521:orcl";
			cn = DriverManager.getConnection(url, user, password);
		}
		return cn;
	}
}
